function varargout = CRISPR_PopModel(varargin)
% CRISPR_POPMODEL MATLAB code for CRISPR_PopModel.fig
%      CRISPR_POPMODEL, by itself, creates a new CRISPR_POPMODEL or raises the existing
%      singleton*.
%
%      H = CRISPR_POPMODEL returns the handle to a new CRISPR_POPMODEL or the handle to
%      the existing singleton*.
%
%      CRISPR_POPMODEL('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in CRISPR_POPMODEL.M with the given input arguments.
%
%      CRISPR_POPMODEL('Property','Value',...) creates a new CRISPR_POPMODEL or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before CRISPR_PopModel_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to CRISPR_PopModel_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help CRISPR_PopModel

% Last Modified by GUIDE v2.5 09-Oct-2011 05:29:48

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @CRISPR_PopModel_OpeningFcn, ...
                   'gui_OutputFcn',  @CRISPR_PopModel_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before CRISPR_PopModel is made visible.
function CRISPR_PopModel_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to CRISPR_PopModel (see VARARGIN)

% Choose default command line output for CRISPR_PopModel
handles.output = hObject;
set(handles.s0,'string',200);
set([handles.r0 handles.c0],'string',100);
set(handles.k,'string',2000);
set(handles.er,'string',0);
set(handles.ec,'string',.3);
set(handles.doub,'string',.4);
set(handles.d,'string',0.01);
set(handles.delta,'string',2);
set([handles.Fsr handles.Fsc],'string',0.1);
set(handles.Frc,'string',0);
set(handles.gr,'string',.15);
set(handles.gc,'string',.1);
set(handles.tf,'string', 24);
set(handles.ta,'string',16);
% Update handles structure
guidata(hObject, handles);


% UIWAIT makes CRISPR_PopModel wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = CRISPR_PopModel_OutputFcn(hObject, eventdata, handles)
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
cla;
axes(handles.axes1);
cla;
warning off all;
% ---------------------------------------------------------------------

birth=log(2)./str2double(get(handles.doub,'string')); %specific growth rate (mu)
rates = struct('k',str2double(get(handles.k,'string')),'b',birth,'er',str2double(get(handles.er,'string'))/str2double(get(handles.doub,'string')),'ec',str2double(get(handles.ec,'string'))/str2double(get(handles.doub,'string')),'d',str2double(get(handles.d,'string'))/str2double(get(handles.doub,'string')),'delta',str2double(get(handles.delta,'string'))/str2double(get(handles.doub,'string')),'Fsr',str2double(get(handles.Fsr,'string'))/str2double(get(handles.doub,'string')),'Fsc',str2double(get(handles.Fsc,'string'))/str2double(get(handles.doub,'string')),'Frc',str2double(get(handles.Frc,'string'))/str2double(get(handles.doub,'string')),'gr',str2double(get(handles.gr,'string'))/str2double(get(handles.doub,'string')),'gc',str2double(get(handles.gc,'string'))/str2double(get(handles.doub,'string')),'ta',str2double(get(handles.ta,'string')));
[t pop]=ode15s(@logistic_t,[0 str2double(get(handles.tf,'string'))],[handles.s0 handles.r0 handles.c0],odeset('reltol',1e-5),rates);
plot(t,pop(:,1),'b-',t,pop(:,2),'k-.',t,pop(:,3),'r.')
% Blue is S, Black is R, Red is C
xlabel('t');
ylabel('N(t) (cfu)');
title('Logistic growth');
legend('S','R','C');


% --------------------------------------------------------------------
function FileMenu_Callback(hObject, eventdata, handles)
% hObject    handle to FileMenu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function OpenMenuItem_Callback(hObject, eventdata, handles)
% hObject    handle to OpenMenuItem (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
file = uigetfile('*.fig');
if ~isequal(file, 0)
    open(file);
end

% --------------------------------------------------------------------
function PrintMenuItem_Callback(hObject, eventdata, handles)
% hObject    handle to PrintMenuItem (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
printdlg(handles.figure1)

% --------------------------------------------------------------------
function CloseMenuItem_Callback(hObject, eventdata, handles)
% hObject    handle to CloseMenuItem (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
selection = questdlg(['Close ' get(handles.figure1,'Name') '?'],...
                     ['Close ' get(handles.figure1,'Name') '...'],...
                     'Yes','No','Yes');
if strcmp(selection,'No')
    return;
end

delete(handles.figure1)


function s0_Callback(hObject, eventdata, handles)
% hObject    handle to s0 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
s0 = str2double(get(hObject,'string'));
if ~isnumeric(s0)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of s0 as text
%        str2double(get(hObject,'String')) returns contents of s0 as a double


% --- Executes during object creation, after setting all properties.
function s0_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s0 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function r0_Callback(hObject, eventdata, handles)
% hObject    handle to r0 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
r0 = str2double(get(hObject,'string'));
if ~isnumeric(r0)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of r0 as text
%        str2double(get(hObject,'String')) returns contents of r0 as a double


% --- Executes during object creation, after setting all properties.
function r0_CreateFcn(hObject, eventdata, handles)
% hObject    handle to r0 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function c0_Callback(hObject, eventdata, handles)
% hObject    handle to c0 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
c0 = str2double(get(hObject,'string'));
if ~isnumeric(c0)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of c0 as text
%        str2double(get(hObject,'String')) returns contents of c0 as a double


% --- Executes during object creation, after setting all properties.
function c0_CreateFcn(hObject, eventdata, handles)
% hObject    handle to c0 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function k_Callback(hObject, eventdata, handles)
% hObject    handle to k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
k = str2double(get(hObject,'string'));
if ~isnumeric(k)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of k as text
%        str2double(get(hObject,'String')) returns contents of k as a double


% --- Executes during object creation, after setting all properties.
function k_CreateFcn(hObject, eventdata, handles)
% hObject    handle to k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function er_Callback(hObject, eventdata, handles)
% hObject    handle to er (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
er = str2double(get(hObject,'string'));
if ~isnumeric(er)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of er as text
%        str2double(get(hObject,'String')) returns contents of er as a double


% --- Executes during object creation, after setting all properties.
function er_CreateFcn(hObject, eventdata, handles)
% hObject    handle to er (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function ec_Callback(hObject, eventdata, handles)
% hObject    handle to ec (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
ec = str2double(get(hObject,'string'));
if ~isnumeric(ec)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of ec as text
%        str2double(get(hObject,'String')) returns contents of ec as a double


% --- Executes during object creation, after setting all properties.
function ec_CreateFcn(hObject, eventdata, handles)
% hObject    handle to ec (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function doub_Callback(hObject, eventdata, handles)
% hObject    handle to doub (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
doub = str2double(get(hObject,'string'));
if ~isnumeric(doub)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of doub as text
%        str2double(get(hObject,'String')) returns contents of doub as a double


% --- Executes during object creation, after setting all properties.
function doub_CreateFcn(hObject, eventdata, handles)
% hObject    handle to doub (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function delta_Callback(hObject, eventdata, handles)
% hObject    handle to delta (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
delta = str2double(get(hObject,'string'));
if ~isnumeric(delta)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of delta as text
%        str2double(get(hObject,'String')) returns contents of delta as a double


% --- Executes during object creation, after setting all properties.
function delta_CreateFcn(hObject, eventdata, handles)
% hObject    handle to delta (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function d_Callback(hObject, eventdata, handles)
% hObject    handle to d (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
d = str2double(get(hObject,'string'));
if ~isnumeric(d)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of d as text
%        str2double(get(hObject,'String')) returns contents of d as a double


% --- Executes during object creation, after setting all properties.
function d_CreateFcn(hObject, eventdata, handles)
% hObject    handle to d (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function Fsr_Callback(hObject, eventdata, handles)
% hObject    handle to Fsr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
Fsr = str2double(get(hObject,'string'));
if ~isnumeric(Fsr)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of Fsr as text
%        str2double(get(hObject,'String')) returns contents of Fsr as a double


% --- Executes during object creation, after setting all properties.
function Fsr_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Fsr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function Fsc_Callback(hObject, eventdata, handles)
% hObject    handle to Fsc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
Fsc = str2double(get(hObject,'string'));
if ~isnumeric(Fsc)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of Fsc as text
%        str2double(get(hObject,'String')) returns contents of Fsc as a double


% --- Executes during object creation, after setting all properties.
function Fsc_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Fsc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function Frc_Callback(hObject, eventdata, handles)
% hObject    handle to Frc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
Frc = str2double(get(hObject,'string'));
if ~isnumeric(Frc)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of Frc as text
%        str2double(get(hObject,'String')) returns contents of Frc as a double


% --- Executes during object creation, after setting all properties.
function Frc_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Frc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function gr_Callback(hObject, eventdata, handles)
% hObject    handle to gr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
gr = str2double(get(hObject,'string'));
if ~isnumeric(gr)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of gr as text
%        str2double(get(hObject,'String')) returns contents of gr as a double


% --- Executes during object creation, after setting all properties.
function gr_CreateFcn(hObject, eventdata, handles)
% hObject    handle to gr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function gc_Callback(hObject, eventdata, handles)
% hObject    handle to gc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
gc = str2double(get(hObject,'string'));
if ~isnumeric(gc)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of gc as text
%        str2double(get(hObject,'String')) returns contents of gc as a double


% --- Executes during object creation, after setting all properties.
function gc_CreateFcn(hObject, eventdata, handles)
% hObject    handle to gc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function tf_Callback(hObject, eventdata, handles)
% hObject    handle to tf (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
tf = str2double(get(hObject,'string'));
if ~isnumeric(tf)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of tf as text
%        str2double(get(hObject,'String')) returns contents of tf as a double


% --- Executes during object creation, after setting all properties.
function tf_CreateFcn(hObject, eventdata, handles)
% hObject    handle to tf (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function ta_Callback(hObject, eventdata, handles)
% hObject    handle to ta (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
ta = str2double(get(hObject,'string'));
if ~isnumeric(ta)
  errordlg('You must enter a numeric value','Bad Input','modal')
  uicontrol(hObject)
	return
end
% Hints: get(hObject,'String') returns contents of ta as text
%        str2double(get(hObject,'String')) returns contents of ta as a double


% --- Executes during object creation, after setting all properties.
function ta_CreateFcn(hObject, eventdata, handles)
% hObject    handle to ta (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in ClearFig.
function ClearFig_Callback(hObject, eventdata, handles)
% hObject    handle to ClearFig (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
cla;

% --- Executes on button press in Save.
function Save_Callback(hObject, eventdata, handles)
% hObject    handle to Save (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in Default.
function Default_Callback(hObject, eventdata, handles)
% hObject    handle to Default (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
handles.output = hObject;
set(handles.s0,'string',200);
set([handles.r0 handles.c0],'string',100);
set(handles.k,'string',2000);
set(handles.er,'string',0);
set(handles.ec,'string',.3);
set(handles.doub,'string',.4);
set(handles.d,'string',0.01);
set(handles.delta,'string',2);
set([handles.Fsr handles.Fsc],'string',0.1);
set(handles.Frc,'string',0);
set(handles.gr,'string',.15);
set(handles.gc,'string',.1);
set(handles.tf,'string', 24);
set(handles.ta,'string',16);


% --- Executes on button press in Clear.
function Clear_Callback(hObject, eventdata, handles)
% hObject    handle to Clear (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
cla;
set([handles.s0 handles.r0 handles.c0],'string','');
set(handles.k,'string','');
set([handles.er handles.ec],'string','');
set(handles.doub,'string','');
set(handles.d,'string','');
set(handles.delta,'string','');
set([handles.Fsr handles.Fsc handles.Frc],'string','');
set([handles.gc handles.gr],'string','');
set(handles.tf,'string', '');
set(handles.ta,'string','');
